<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
		<include file="__VIEW__/Common/memberTop"/>
		<script type="text/javascript">
		$(function(){
			$("input[name=face]").change(function(){
				var objUrl = getObjectURL(this.files[0]) ;
				console.log("objUrl = "+objUrl) ;
				if (objUrl) {
		//			给图片添加src并显示
					$(this).siblings('img').attr("src", objUrl);
				}
			});
			//建立一個可存取到該file的url
			function getObjectURL(file) {
				var url = null ; 
				if (window.createObjectURL!=undefined) { // basic
					url = window.createObjectURL(file) ;
				} else if (window.URL!=undefined) { // mozilla(firefox)
					url = window.URL.createObjectURL(file) ;
				} else if (window.webkitURL!=undefined) { // webkit or chrome
					url = window.webkitURL.createObjectURL(file) ;
				}
				return url ;
			}
			
		})
		</script>
		<!--个人中心导航结束-->
		<!--默认首页开始-->
		<div class="defaultIndex">
			<include file="__VIEW__/Common/memberLeft" />
			<div class="jfBox">
				<ul class="wsmjTab3">
					<li class="current" style="border-left: 1px solid #DFDFDC;"><a href="javascript:;">基本信息</a></li>
					<li><a href="javascript:;">修改密码</a></li>
					<!--<li><a href="javascript:;">修改电子邮箱</a></li>-->
				</ul>
				<div class="box">
					<form action="" method="post" enctype="multipart/form-data">
						<dl>
							<dt>昵称：</dt>
							<dd>
								<input type="text" name="nickname" value="{$userData.nickname}" />
							</dd>
						</dl>
						<dl>
							<dt>用户名：</dt>
							<dd>{$userData.username}</dd>
						</dl>
						<dl>
							<dt>真实姓名：</dt>
							<dd><input type="text" name="realname" value="{$userData.realname}" /></dd>
						</dl>
						<dl>
							<dt>个人简介：</dt>
							<dd><textarea name="introduce" id="" style="width: 375px; height: 118px;">{$userData.introduce}</textarea></dd>
						</dl>
						<dl>
							<dt>性别：</dt>
							<dd>
								
								<input type="radio" name="sex" id="nan" value="男" <if value="$userData['sex']=='男'">checked</if> /><label for="nan">男</label>
								<input type="radio" name="sex" id="nv" value="女" <if value="$userData['sex']=='女'">checked</if> /><label for="nv">女</label>
							</dd>
						</dl>
						<dl>
							<dt>生日：</dt>
							<dd><input type="text" name="birthday" value="{$userData.birthday}" /><span>例如：0000-00-00</span></dd>
						</dl>
						<dl>
							<dt>上传头像：</dt>
							<dd>
								<input type="file" name="face" id="face" />
								<br /><br />
								<img src="__ROOT__/{$userData.face}" alt="" width="150" height="150"/>
							</dd>
						</dl>
						<dl>
							<dt style="height: 50px;"></dt>
							<input type="hidden" name="uid" value="{$userData['uid']}" />
							<dd><input type="submit" value="" class="save"/></dd>
						</dl>
					</form>
				</div>
				<div class="box" style="display: none;">
					<form action="{|U:'editPassword'}" method="post">
					<dl>
						<dt>当前密码：</dt>
						<dd><input type="password" name="current" id="mima" /></dd>
					</dl>
					<dl>
						<dt>新密码：</dt>
						<dd><input type="password" name="password1" id="" /></dd>
					</dl>
					<dl>
						<dt>确认密码：</dt>
						<dd><input type="password" name="password2" id="" /></dd>
					</dl>
					<dl>
						<dt style="height: 50px;"></dt>
						<dd><input type="submit" value="" class="save"/></dd>
					</dl>
					</form>
				</div>
			</div>
			
		</div>
		<!--默认首页结束-->
		<div class="clear"></div>
		<!--底部开始-->
		<include file="__VIEW__/Common/footer" />
